Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So, I was trying to build it as a shared lib, with the CC/CFLAGS/LDFLAGS I wanted, but the makefiles doesn't allow that. As I was adding it, I found some over-customisation (IMHO), such as the
DELETEvariable and many code duplication. And my small patch kept growing bigger, so I rewrote most of it, trying to commonize logic and identical variable.I think it's a better design but I might have overlooked some wanted features of the old one; it's a proposal. Also, I wasn't able to tests all builds, don't have a Windows, don't have an ARM.
With this PR, it's easy to build a shared lib (
make SHARED=y), build out of tree, use another compiler (ccachefor eg), specific the wanted build flags (for source based distro)...Btw, by playing with CFLAGS, if you remove the
-O2, some build will fail to link (or rather, it will fail to link the final binary). It's because the inlining done when usingopts-GCC.hdoesn't generate a symbol, becauseinlineis a weird keyword, see this good answer on stackoverflow. Adding the prototype, in the C files where the overridden is effective, fixes it.While I'm at it, building a shared lib need a good SONAME, but I'm not sure of the binary compatibility being kept; there is not support for it now but it's trivial to add. Also, why outputing to
softfloat.aand notlibsoftfloat.a, it's not standard so GCC won't find it with the classicgcc -lsoftfloat?